export const popased=[
    {value:'id',label:'ID'},
    {value:'name',label:'广告名称'},
    {value:'pic_url',label:'图片内容'},
    {value:'link',label:'链接地址'},
    {value:'status',label:'广告位置'},
    {value:'type',label:'状态'},
    {value:'remark',label:'备注'},
 ]

 export const useAdvAllList = () => {

    // 创建一个空数组
    const advList = ref([])
    // 定义一个方法
    const getAllAdvList = async () => {
      const { data } = await getAdvertisingApi()
      // console.log(data);
      advList.value = data
    }
    onMounted(() => {
      getAllAdvList()
    })
    
    return advList
  }
  
  // 获取广告状态
  export const useAdvState = () => {
    let stateList = [
      { label: '开启', value: 1 },
      { label: '禁用', value: 0 }
    ]
  
    return stateList
  }
  
  // 获取广告位置
  export const usePlaceState = () => {
    let placeList = [
      { label: '移动端轮播图', value: 1 },
      { label: 'PC端轮播图', value: 2 }
    ]
  
    return placeList
  }

export const usatTonued=(neadAll=false)=>{
    let maopuad=[
        {label:'王明伟',value:0},
        {label:'保利东郡伊园7777',value:1},
        {label:'吟春园',value:2},
        {label:'江晨园',value:3},
        {label:'芳玲家园',value:4},
        {label:'信地藏龙阁',value:5},
        {label:'v额',value:6},
    ]
    if(neadAll)maopuad.unshift({label:'全部',value:''})
    return maopuad
}

